// Oliver Shyal Beardsley
// 16/3/2012

//! MajorSystem class declaration

#ifndef _MAJORSYSTEM_H_
#define _MAJORSYSTEM_H_

#include <QString>

class MajorSystemWord
{
	public:
		MajorSystemWord(QString word);

		bool			operator==(const QString&);
		bool			operator<(const MajorSystemWord&) const;

		unsigned int	getNumMajorSounds() const;
		const QString&	getWord() const;
		const QString&	getNum() const;

		// unit testing functions
		static bool		testWord(const QString& word, const QString& number);
		static void		MajorSystemWordTest();

	private:
		QString			nextLetter(QString::const_iterator it);
		QString			previousLetter(QString::const_iterator it);
		void			buildNum();

		QString			m_word;

		// this version might get mutilated by string parsing algorithm
		QString			m_wordWrk;

		QString			m_numStr;
};

#endif
